home *** CD-ROM | disk | FTP | other *** search
- Path: druid.borland.com!usenet
- From: pete@borland.com (Pete Becker)
- Newsgroups: comp.os.ms-windows.programmer.tools.misc,comp.os.ms-windows.programmer.win32,comp.os.ms-windows.programmer.misc,comp.lang.c++
- Subject: Re: [Q] Why doesn't this compile?
- Date: 17 Apr 1996 18:44:05 GMT
- Organization: Borland International
- Message-ID: <4l3e5l$e1t@druid.borland.com>
- References: <317523C0.5042@eps.agfa.be>
- NNTP-Posting-Host: pbecker.borland.com
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=ISO-8859-1
- X-Newsreader: WinVN 0.99.5
-
- In article <317523C0.5042@eps.agfa.be>, rorlic@eps.agfa.be says...
- >
- >Using MSVC 4.0 compiler I get the following:
- >
- >File test.cpp: ---------------------------------
- >
- >class A {
- >public:
- > class L {
- > public:
- > L() {}
- > virtual void f() {
- > int dummy = 0;
- > }
- > };
- > A();
- >};
- >
- >class B : public A {
- > class L : public A::L {
- > public:
- > L() {}
- > virtual void f() {
- > A::L::f();
- > }
- > };
- > B();
- >};
- >
- >Compilation result: ----------------------------
- >
- >test.cpp(18) : error C2352: 'A::L::f' : illegal call of
- >nonstatic member function
- >Error executing cl.exe.
- >test.obj - 1 error(s), 1 warning(s)
- >
- >------------------------------------------------
- >
- >Anybody knows what's wrong with it?
-
- There's nothing wrong with it. The problem is in your compiler.
- -- Pete
-
-